// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import 'babel-polyfill'
import Es6Promise from 'es6-promise'
Es6Promise.polyfill()
import Vue from 'vue'
import App from './App'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import router from './router'
import ElementUI from 'element-ui'
import store from './store'
import 'element-ui/lib/theme-chalk/index.css'
import '@/commonScss/index.scss' // global css
import './permission' // permission control
import '@/icons' // icons
import socket from '@/socket'
import FastClick from 'fastclick'
import $common from '@ntr/common'
// const { SwitchNo } = $common

import { mockXHR } from '../mock'

if (process.env.NODE_ENV === 'development') {
  mockXHR()
}

Vue.config.productionTip = false
// Vue.prototype.$

Vue.use(ElementUI)
// Vue.use(SwitchNo)
Vue.use($common)

FastClick.attach(document.body)
socket.init()

/* eslint-disable no-new */
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
